import sys
# from PyQt5.QtWidgets import QApplication
from qtpy.QtWidgets import QApplication
from pmgwidgets.display import PMMatplotlibQt5Widget


def draw():
    ax = pmqt5mplwgt.add_subplot(121)
    ax2 = pmqt5mplwgt.add_subplot(122)
    ax.plot([1, 2, 3])
    ax.set_xlabel('test_x_label')
    ax2.set_xlabel('test_2')
    ax2.plot([1, 3, 1, 4, 15])
    pmqt5mplwgt.draw()

app = QApplication(sys.argv)
pmqt5mplwgt = PMMatplotlibQt5Widget()
pmqt5mplwgt.show()
draw()
app.exec()
